package android.gpsmessenger.location;

import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;

/* For some reason, emulator does a poor job of returning locations unless we register a listener
 * ref: http://stackoverflow.com/questions/1608632/android-locationmanager-getlastknownlocation-returns-null */
public class MyLocationListener implements LocationListener {

	public void onLocationChanged(Location location) {
//		String message = String.format(
//				"New Location \n Longitude: %1$s \n Latitude: %2$s",
//				location.getLongitude(), location.getLatitude()
//		);
//		Toast.makeText(LbsGeocodingActivity.this, message, Toast.LENGTH_LONG).show();
	}

	public void onStatusChanged(String s, int i, Bundle b) {
//		Toast.makeText(LbsGeocodingActivity.this, "Provider status changed",
//				Toast.LENGTH_LONG).show();
	}

	public void onProviderDisabled(String s) {
//		Toast.makeText(LbsGeocodingActivity.this,
//				"Provider disabled by the user. GPS turned off",
//				Toast.LENGTH_LONG).show();
	}

	public void onProviderEnabled(String s) {
//		Toast.makeText(LbsGeocodingActivity.this,
//				"Provider enabled by the user. GPS turned on",
//				Toast.LENGTH_LONG).show();
	}

}